extends Camera2D
class_name Camera

func _process(delta: float) -> void:
	if is_instance_valid(Global.player):
		var target_position = Global.player.charecter_body_2d.position
		target_position.x = clamp(target_position.x, -500, 500)
		target_position.y = clamp(target_position.y, -1000, 1000)
		global_position = target_position
	
